package cn.qixin.passport.mapper;


import cn.qixin.passport.pojo.entity.UserRole;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import java.util.ArrayList;
import java.util.List;

@SpringBootTest
public class URtest {

    @Autowired
    UserRoleMapper mapper;

    @Test
    void testInsertBatch(){
        List<UserRole> list = new ArrayList<>();
        for (int i = 0; i < 3; i++) {
            UserRole userRole = new UserRole();
            userRole.setUserId(100L);
            userRole.setRoleId(i+0L);
            list.add(userRole);
        }
        int i = mapper.insertBatch(list);
        System.out.println(i);
    }
}
